package org.binglan.youziyuepai.service;

import org.binglan.youziyuepai.entity.UserToPhotographyTag;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 用户与摄影标签多对多表 服务类
 * </p>
 *
 * @author sanjin
 * @since 2019-04-09
 */
public interface UserToPhotographyTagService extends IService<UserToPhotographyTag> {

    /**
     * 判断用户是否有该标签
     * @return
     */
    boolean isExists(String userId, Integer photographyTagId);

    /**
     * 删除用户所有的标签
     * @return
     */
    boolean deleteAllByUserId(String userId);

    /**
     * 批量保存
     * @param userToPhotographyTagList
     * @return
     */
    boolean saveUserToPhotographyTagByBatch(List<UserToPhotographyTag> userToPhotographyTagList);
}
